<html>
<head>
    <meta charset="utf-8"/>
    <title>{:get_system_config('system_name','system')}</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__COMMON__/layuiadmin/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="__COMMON__/font-awesome/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="__COMMON__/layuiadmin/style/admin.css" media="all"/>
    <link rel="stylesheet" href="__ADMIN__/css/style.min.css"/>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1228488_cc32s4goxh9.css"/>
</head>
<body>
    <code
        class="hljs xml">
        <ol class="hljs-ln">
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="1"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="php">
                            <span class="hljs-meta">&lt;?php</span>
                        </span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="2"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-comment">//背景图片路径</span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="3"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        $srcurl =
                        <span class="hljs-string">'./img/japan_map.jpg'</span>
                        ;
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="4"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-comment">//目标图片路径</span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="5"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        $desurl =
                        <span class="hljs-string">'./img/begin.png'</span>
                        ;
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="6"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line"></div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="7"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-comment">//创建源图的实例</span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="8"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">$src = imagecreatefromstring(file_get_contents($srcurl));</div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="9"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-comment">//创建点的实例</span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="10"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">$des = imagecreatefrompng($desurl);</div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="11"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-comment">//获取点图片的宽高</span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="12"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-keyword">list</span>
                        ($point_w, $point_h) =
                    getimagesize($desurl);
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="13"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line"></div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="14"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-comment">//重点：png透明用这个函数</span>
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="15"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        imagecopy($src, $des,
                        <span class="hljs-number">970</span>
                        ,
                        <span
                        class="hljs-number">1010</span>
                        ,
                        <span class="hljs-number">0</span>
                        ,
                        <span
                        class="hljs-number">0</span>
                        , $point_w, $point_h);
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="16"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        imagecopy($src, $des,
                        <span class="hljs-number">930</span>
                        ,
                        <span
                        class="hljs-number">1310</span>
                        ,
                        <span class="hljs-number">0</span>
                        ,
                        <span
                        class="hljs-number">0</span>
                        , $point_w, $point_h);
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="17"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line"></div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="18"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        header(
                        <span class="hljs-string">'Content-Type: image/jpeg'</span>
                        );
                    </div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="19"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">imagejpeg($src);</div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="20"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">imagedestroy($src);</div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="21"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">imagedestroy($des);</div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="22"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line"></div>
                </div>
            </li>
            <li>
                <div class="hljs-ln-numbers">
                    <div class="hljs-ln-line hljs-ln-n" data-line-number="23"></div>
                </div>
                <div class="hljs-ln-code">
                    <div class="hljs-ln-line">
                        <span class="hljs-meta">?&gt;</span>
                    </div>
                </div>
            </li>
        </ol>
    </code>
</body>